import type Typings from "@/typings";

export namespace Request {
  export type type =
    | "post"
    | "get"
    | "put"
    | "delete"
    | "POST"
    | "GET"
    | "PUT"
    | "DELETE";

  // 请求 config 配置参数类型
  export type config = Typings.Common.plainObj & {
    timeout?: number;
    openLoading?: boolean;
  };

  // 请求取消 Source 类型
  export type source = {
    url: string;
    method: type;
    data: Typings.Common.plainObj;
    source: any;
    cancel?: any;
  };
}
